package com.aliyun.messagemgt.dto;

import com.aliyun.messagemgt.common.annotation.CustomAnnotation;
import com.aliyun.messagemgt.dto.base.FourAObjectEntity;
import com.aliyun.messagemgt.common.dto.base.UserInfo;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.List;

/**
 * @author
 * @date
 */
@EqualsAndHashCode(callSuper = true)
@Data
@ApiModel(value = "MsgAdd消息发送任务新增")
public class MsgAdd extends UserInfo {

    @ApiModelProperty(value = "主键ID")
    private Long msgSourceId;

    @CustomAnnotation(name = "sourceCode", desc = "发送任务code")
    @ApiModelProperty(value = "发送任务编码")
    private String sourceCode;

    @ApiModelProperty(value = "发送任务名称")
    private String sourceName;

    @ApiModelProperty(value = "消息源名称")
    private String messageName;

    @ApiModelProperty(value = "消息源Code")
    private String messageCode;

    @ApiModelProperty(value = "消息类型")
    private String messageType;

    @ApiModelProperty(value = "场景编码")
    private String sceneCode;

    @ApiModelProperty(value = "场景名称")
    private String sceneName;

    @ApiModelProperty(value = "渠道ID")
    private List<Long> pushChannelIds;

    @CustomAnnotation(name = "pushChannelType", desc = "推送渠道类型")
    @ApiModelProperty(value = "推送渠道类型")
    private Integer pushChannelType;

   /* @ApiModelProperty(value = "渠道ID")
    private Long pushChannelId;*/

    @ApiModelProperty(value = "渠道编码")
    private String pushChannelCode;

    @ApiModelProperty(value = "渠道名称")
    private String pushChannelName;

    @ApiModelProperty(value = "消息模板id")
    private Long templateId;

    @ApiModelProperty(value = "消息模板编码")
    private String templateCode;

    @ApiModelProperty(value = "消息模板名称")
    private String templateName;

    @ApiModelProperty(value = "接收组编码")
    private String receiveGroupCode;

    @ApiModelProperty(value = "管理员")
    private List<FourAObjectEntity> ownerRequest;


    @ApiModelProperty(value = "归属部门名称")
    private String ownerDeptName;

    @CustomAnnotation(name = "ownerDept", desc = "归属部门")
    private String ownerDept;

    @CustomAnnotation(name = "sourceDescription", desc = "消息源描述")
    private String sourceDescription;

    @CustomAnnotation(name = "resendChannelId", desc = "重发推送渠道ID")
    private Integer resendChannelId;

    @CustomAnnotation(name = "resendChannelName", desc = "重发推送渠道名称")
    private String resendChannelName;

    @CustomAnnotation(name = "flowControlTimeUnit", desc = "流控时间单位")
    private Integer flowControlTimeUnit;

    @CustomAnnotation(name = "flowControlCountLimit", desc = "API最大调用次数")
    private Integer flowControlCountLimit;

    @CustomAnnotation(name = "startTime", desc = "有效期开始时间")
    @JsonFormat( pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private String startTime;


    @CustomAnnotation(name = "endTime", desc = "有效期结束时间")
    @JsonFormat( pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private String endTime;

    @CustomAnnotation(name = "auditStatus", desc = "状态码")
    private Integer auditStatus;

    @ApiModelProperty(value = "消息源有效期类型：1：不限 2：一年有效期 3：一个月 4：一周 5：当天有效 6：自定义")
    private Integer sourceType;

    @ApiModelProperty(value = "是否启用 Y-启用 N-停用")
    private String isEnabled;

    @ApiModelProperty(value = "失败重发次数")
    private Integer failureResendTimes;

    @ApiModelProperty(value = "失败重发时间间隔，单位秒")
    private Integer failureResendInterval;


    @ApiModelProperty(value = "租户code")
    private String tenantCode;
}
